import { Navigate, RouteObject } from 'react-router-dom';
import { lazy } from 'react';
import { Auth } from './auth';
import { Error404 } from '@/pages/error/404';
const Index = lazy(() => import('../pages/index'));
const About = lazy(() => import('../pages/about'));

export const routes: RouteObject[] = [
  {
    element: <Auth />,
    children: [
      {
        path: '/',
        element: <Index />,
      },
    ],
  },
  { path: '/about', element: <About /> },
  { path: '/404', element: <Error404 /> },
  { path: '*', element: <Navigate to='/404' /> },
];
